package com.haizhi.util;

import java.io.File;

public class MoveFile {

    public static void main(String[] args) {
        try {
            File file = new File("C:\\zuidaima_com_a\\zuidaima_com.txt");
            if (file.renameTo(new File("C:\\zuidaima_com_b\\" + file.getName()))) {
                System.out.println("File is moved successful!");
            } else {
                System.out.println("File is failed to move!");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
